<template>
	<view>
		<u-popup v-model="show" 
			mode="center" 
			mask-close-able 
			border-radius="30" 
			close-icon-size='36'
		>
			<view class="popup-container">
				<image class="bg" src="/static/wxImage/bg-qrcode.png" mode="aspectFill"></image>
				<view class="content">
					<view class="title">面对面邀请</view>
					<view class="sub-title">扫一扫二维码 获得加注优惠</view>
					<view class="qrcode-wrap u-f-ajc">
						<image  class="qrcode" :src="qrcodeImg" mode="aspectFill"></image>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	
	export default {
		name:'invite-ways',
		props:{
			qrcodeImg:{
				type:String,
				default:''
			}
		},
		data() {
			return {
				show:false,
				src:'',
				canTap: false
			}
		},
		mounted() {
			setTimeout(() => {
				this.canTap = true;
			},1500)
		},
		methods:{
			open() {
				this.show = true;
			},
			close() {
				if(this.canTap) {
					this.show = false;
				};
			}
		}
	}
</script>

<style lang="scss">
	.popup-container {
		width: 550rpx;
		height: 763rpx;
		background-color: #FFFFFF;
		display: flex;
		
		.bg {
			position: absolute;
			width: 100%;
			height: 100%;
			z-index: 1;
		}
		
		.content {
			position: absolute;
			width: 100%;
			height: 100%;
			z-index: 2;
			flex-direction: column;
			align-items: center;
				
			.title {
				color: #FFFFFF;
				font-size: 36rpx;
				margin: 65rpx 0;
			}	
			
			.sub-title {
				font-size: 28rpx;
				color: #FFFFFF;
			}
		}
		
		.qrcode-wrap {
			width: 500rpx;
			height: 500rpx;
			background-color: #FFFFFF;
			margin-top: 20rpx;
			.qrcode {
				width: 414rpx;
				height: 414rpx;
				flex-shrink: 0;
			}
		}
		
	}
</style>
